 
from pybricks.parameters import Port
 
from pybricks.ev3devices import InfraredSensor

class MyInfrared:
     def __init__(self):
        print("MyInfrared starting  ------------")
        self.myInfrared = InfraredSensor(Port.S4)
        # Initialize the motors.
     
    def goAhead(self, distance=0):
        print("goAhead  ------------")
        self.robot.straight(distance)